package educrypt.gui.ctr;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import educrypt.gui.view.GoToView;
import educrypt.gui.view.MainView;

public class GoToCtr implements ActionListener {
	private MainView mainView;

	public GoToCtr(MainView mainView) {
		this.mainView = mainView;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		String command = e.getActionCommand();
		if (command.equals(GoToView.GOTO_CIPHERS)) {
			mainView.goToCiphers();
		}
		if (command.equals(GoToView.GOTO_CRYPTANALYSIS)) {
			mainView.goToCryptAnalysis();
		}
		if (command.equals(GoToView.GOTO_ANALYSIS)) {
			mainView.goToAnalysis();
		}
		if (command.equals(GoToView.GOTO_DATABASE)) {
			mainView.goToDatabase();
		}
		if (command.equals(GoToView.GOTO_ABOUT)) {
			mainView.goToAbout();
		}
	}

}
